<?php
$container=$app->container;




//Smarty模板引擎
$smarty = new Smarty();
$smarty->caching = false;//是否使用缓存
$smarty->template_dir = dirname(getcwd()).'/app/view';//设置模板目录
$smarty->left_delimiter = '{%';
$smarty->right_delimiter = '%}';


//myql
$dbsetting=array(
    'driver' => 'mysql',
    'host' => '127.0.0.1',
    'database' => 'contiqa',
    'username' => 'root',
    'password' => '',
    'charset' => 'utf8',
    'collation' => 'utf8_general_ci',
    'prefix' => 'conti_',
);
$capsule = new \Illuminate\Database\Capsule\Manager;
$capsule->addConnection($dbsetting);

$capsule->setAsGlobal();
$capsule->bootEloquent();
$container->set('renderer',$smarty);
$container->set('db',$capsule);


